package dao;

import static org.junit.Assert.*;

import org.java.bo.Performace;
import org.java.dao.PerformaceDAO;
import org.junit.Test;

public class TestPerformaceDAO {

	@Test
	public void testCreate() {
		PerformaceDAO dao = null;
		try {
			dao = new PerformaceDAO();
			//dao.autoClose();
			for (int i = 1; i < 1000; i++) {
				Performace performace = new Performace();
				performace.setCost(new Double(Math.random()*10000).longValue());
				performace.setFunction("getBills");
				performace.setTime(System.nanoTime());
				dao.create(performace);
			}
		} catch (Exception e) {
			fail(e.toString());
		} finally {
			dao.close();
		}
	}

	@Test
	public void testUpdate() {
		fail("Not yet implemented");
	}

	@Test
	public void testGet() {
		fail("Not yet implemented");
	}

}
